﻿import java.util.Scanner;


public class Exercise10 {

	public static void main(String[] args) {
		Scanner input=new Scanner(System.in);
        System.out.println("***欢迎进入注册系统***");
        new Exercise10().verify("", "", "");
	}

	public boolean verify(String name,String pwd1,String pwd2){
		Scanner input=new Scanner(System.in);
		boolean flag=false;
		do {
			 System.out.println("请输入用户名:");
			  name=input.next();
			  System.out.println("请输入密码:");
			  pwd1=input.next();
			  System.out.println("请再次输入密码:");
			  pwd2=input.next();
			if(name.length()<3||pwd1.length()<6){
				System.out.println("用户名长度不能小于3,密码长度不能小于6");
			}else if(!pwd1.equals(pwd2)){
				System.out.println("二次密码输入不相同!");
			}else{
				System.out.println("注册成功!请牢记用户名密码。");
			}
		} while (flag);
		return flag;
	}
}
